package com.hfy.pcberpbackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hfy.pcberpbackend.entity.Supplier;
import com.hfy.pcberpbackend.dto.SupplierQueryDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 供应商Mapper接口
 */
@Mapper
public interface SupplierMapper extends BaseMapper<Supplier> {
    
    /**
     * 分页查询供应商列表
     */
    IPage<Supplier> selectSupplierPage(Page<Supplier> page, @Param("query") SupplierQueryDTO query);
    
    /**
     * 检查供应商代码是否存在
     */
    int countBySupplierCode(@Param("supplierCode") String supplierCode, @Param("excludeId") Long excludeId);
} 